<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>17_赋值运算符</title>
    </head>
    <body>
        <script>
            // (1) =
            // var a = 1;

            // (2) +=
            var a = 2;
            // a = a + 3;
            a += 3;
            console.log(a);

            // (3) -=
            var a = 3;
            // a = a - 2;
            a -= 2;
            console.log(a);

            // (4) *=
            var a = 2;
            // a = a * 3;
            a *= 3;
            console.log(a);

            // (5) /=
            var a = 4;
            // a = a / 2;
            a /= 2;
            console.log(a);


            // %= 
            var a = 1;
            // a = a % 3;
            a %= 3;
            console.log(a);
        </script>
    </body>
</html>